<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch"
          action="${request.getContextPath()}/dataAcquisition/edcReport" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="resultList"/>
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="edcExcel"/>

            <label>Part ID：</label>
            <g:select name="part" from="${partList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="name" optionValue="name" value="${part}" data-size="12" data-width="200"
                      noSelection="['': 'ALL']" data-nextselect="#lotsList"
                      data-refurl="${request.getContextPath()}/JsonData/getOptionHTMLByTarget?name={value}&SYS_QUERY_NAME=lotsList"/>&nbsp;
            <label>LOT_ID ：</label>
            <g:select name="lotid" from="${lotsList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="label" optionValue="value" value="${lotid}" data-size="12" data-width="200"
                      noSelection="['': 'ALL']" id="lotsList"/><br>

            <label>Part ID：</label>
            <g:select name="name" from="${partList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="name" optionValue="name" value="${name}" data-size="12" data-width="200"
                      noSelection="['': 'ALL']" data-nextselect="#edcSetName"
                      data-refurl="${request.getContextPath()}/JsonData/getOptionHTMLByTarget?part={value}&SYS_QUERY_NAME=edcSetNameList"/>
            <label>采 集 项 集：</label>
            <g:select name="edcSetName" from="${edcSetNameList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="label" optionValue="value" value="${edcSetName}" data-size="12" data-width="200"
                      id="edcSetName"
                      noSelection="['': 'ALL']"/>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
        %{--<a type="button" class="btn btn-green"--}%
        %{--href="${request.getContextPath()}/dataAcquisition/edcReport?export=xls"--}%
        %{--data-toggle="doexport" data-confirm-msg="确定要导出吗？" data-icon="sign-out">导出</a>--}%
        %{--<button type="button" class="btn-blue"--}%
        %{--onclick="javascript:post('#pagerForm', '${request.getContextPath()}/dataAcquisition/exportExcel')"--}%
        %{--data-icon="file-excel-o" title="导出Excel">导出</button>&nbsp;--}%
            <button id="edcExport" type="button" class="btn btn-green" data-confirm-msg="确定要导出吗？"
                    data-icon="sign-out">导出</button>
        </div>
    </form>
</div>

<div class="bjui-pageContent tableContent">
    <div class="table-responsive edcEXcel" data-tableName="Test Table 1">
        <g:if test="${resultList.size() > 0}">
        %{--<g:render template="exportedcExcel"></g:render>--}%
            <table class="table table-bordered table-hover table-striped table-top" data-width="100%" data-nowrap="true"
                   id="edc">
                <thead>
                <tr>
                    <th width="75">NO.</th>
                    <th width="100">批号</th>
                    <th width="125">stage</th>
                    <th width="125">stepDesc</th>
                    <th width="100">片号</th>
                    <th width="125">标号</th>
                    <th width="75">数据</th>
                    <th width="75">LSL</th>
                    <th width="75">SL</th>
                    <th width="75">USl</th>
                    <th width="100">采集项集</th>
                    <th>采集项</th>
                    <th width="175">采集时间</th>
                    <th width="75">设备ID</th>
                </tr>
                </thead>
                <tbody>
                <g:each in="${resultList}" status="i" var="dataInstance">
                    <tr>
                     <td>${dataInstance.RN}</td>
                        <td>${dataInstance.LOT_ID}</td>
                        <td>${dataInstance.STAGE}</td>
                        <td>${dataInstance.STEPDESC}</td>
                        <td>${dataInstance.FILM}</td>
                        <td>${dataInstance.DC_NAME}</td>
                        <td>${dataInstance.DC_DATA}</td>
                        <td>${dataInstance.LSL}</td>
                        <td>${dataInstance.SL}</td>
                        <td>${dataInstance.USL}</td>
                        <td>${dataInstance.EDC_SET_NAME}</td>
                        <td>${dataInstance.ITEM_NAME}</td>
                        <td>${dataInstance.EDCUPDATE}</td>
                        <td>${dataInstance.MEASURE_EQP}</td>
                    </tr>
                </g:each>
                </tbody>
            </table>
        </g:if>
        <g:else>
            <g:render template="../template/emptyPanel"/>
        </g:else>
    </div>
</div>
<script type="text/javascript" src="../js/tableMerge.js"></script>
<script type="text/javascript">
    jQuery(document).ready(function () {
        _w_table_rowspan("#edc", 1);
        _w_table_rowspan("#edc", 2);
        _w_table_rowspan_ref("#edc", 2, 3);
        _w_table_rowspan_ref("#edc", 3, 4);
        _w_table_rowspan_ref("#edc", 4, 5);
        _w_table_rowspan_ref("#edc", 4, 11);
        _w_table_rowspan_ref("#edc", 4, 14);
        _w_table_rowspan_ref("#edc", 4, 12);
        _w_table_rowspan_ref("#edc", 12, 13);
        jQuery("td[style = 'display: none;']").remove();
    });
    //导出
    $(function () {
        $("#edcExport").click(function () {
            exportExcelbyWeb(".edcEXcel");
        });
    });
</script>
<g:render template="../template/pagination"/>